<!DOCTYPE html>
<html>
<head>
    <title>网盘登录</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container">
        <div class="auth-container">
            <h2 class="auth-title">云存储网盘</h2>
            
            {% with messages = get_flashed_messages(with_categories=true) %}
              {% if messages %}
                {% for category, message in messages %}
                  <div class="flash-messages flash-{{ category }}">
                    {{ message }}
                  </div>
                {% endfor %}
              {% endif %}
            {% endwith %}
            
            <form method="post" style="background:#f9f9f9; padding:2rem; border-radius:8px;">
                <div class="form-group">
                    <label for="email" class="form-label">邮箱</label>
                    <input type="email" id="email" name="email" class="form-control" required>
                </div>
                <div class="form-group">
                    <label for="password" class="form-label">密码</label>
                    <input type="password" id="password" name="password" class="form-control" required>
                </div>
                <button type="submit" class="btn btn-block btn-primary" style="margin-top:1rem;">
                    <i class="fas fa-envelope"></i> 邮箱登录
                </button>
            </form>
            
            <div class="separator">
                <span>或者</span>
            </div>
            <form method="post" style="text-align:center;">
                <button type="submit" name="use_machine_code" class="btn btn-block btn-success" style="margin-top:1rem;">
                    <i class="fas fa-microchip"></i> 一键机器码登录
                </button>
                <p style="color:#888; margin-top:0.5rem;">无需注册，自动创建账户</p>
            </form>
            
            <p style="text-align: center; margin-top: 1.5rem;">
                还没有账号? <a href="{{ url_for('register') }}">立即注册</a>
            </p>
        </div>
    </div>
</body>
</html>